/*
 * @Author: wanlixin
 * @Date: 2019-10-05 10:41:31
 * @LastEditors: wanlixin
 * @LastEditTime: 2019-10-05 13:17:21
 * @Description: a-b 和 驼峰 的互转方法
 */
const camelizeRE = /-(\w)/g;
export function camelize(str) {
  str = String(str);
  return str.replace(camelizeRE, function(m, c) {
    return c ? c.toUpperCase() : '';
  });
}

export function kebab(str) {
  str = String(str);
  return str.replace(/([A-Z])/g, '-$1').toLowerCase();
}
